package com.example.administrator.printoutindemo.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.example.administrator.printoutindemo.mvp.contract.RuKuContract;
import com.example.administrator.printoutindemo.mvp.model.RuKuModel;


@Module
public class RuKuModule {
    private RuKuContract.View view;

    /**
     * 构建RuKuModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public RuKuModule(RuKuContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    RuKuContract.View provideRuKuView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    RuKuContract.Model provideRuKuModel(RuKuModel model) {
        return model;
    }
}